package com.xneure.enging.widget.grid;

import java.util.ArrayList;
import java.util.List;

import com.xneure.enging.ui.element.grid.UiGrid;
import com.xneure.enging.ui.element.grid.UiGridTitle;
import com.xneure.enging.widget.Control;
import com.xneure.enging.widget.Widget;

public class Title extends Widget<UiGridTitle> {
	
	public Title(Grid parent) {
		super(parent);
	}

	@Override
	protected Class<?> getEleType() {
		return UiGrid.class;
	}

	public List<Column> getColumn() {
		return getGridTitles();
	}

	public List<Column> getGridTitles() {
		List<Control> elems = getElems();
		List<Column> list = new ArrayList<Column>(elems.size());
		for (Control ctl : elems) {
			list.add((Column) ctl);
		}
		return list;
	}
}
